/** DoctorModel */
package server.service.doctor;

import java.util.List;

import domain.doctor.Doctor;


/**
Interacts with the DoctorDao and the Panels
 * @author jessienewman
 * @version $Revision: 1.0 $
 */
public class DoctorModel {
	/**
	 * Field dao.
	 */
	private DoctorDao dao;

	/**
	 * Constructor for DoctorModel.
	 */
	public DoctorModel() {
		dao = new DoctorDao();
	}
//
//	public List findDoctors(String s) {
//		return dao.findDoctor(s);
//	}

	/**
	 * Method getDoctor.
	 * @param id Integer
	
	 * @return Doctor */
	public Doctor getDoctor(Integer id) {
		return dao.getDoctor(id);
	}
	
	/**
	 * Method modifyName.
	 * @param id Integer
	 * @param nameFirst String
	 * @param nameMiddle String
	 * @param nameLast String
	 */
	public void modifyName(Integer id, String nameFirst, 
			String nameMiddle, String nameLast) {
		dao.modifyNameFirst(id, nameFirst);
		dao.modifyNameMiddle(id, nameMiddle);
		dao.modifyNameLast(id, nameLast);
	}
	
	/**
	 * Method isDoctor.
	 * @param id Integer
	
	 * @return Boolean */
	public Boolean thisIsDoctor(Integer id) {
		return (getDoctor(id) != null);
	}
	
	/**
	 * Method getAllDoctors.
	
	 * @return Doctor[] */
	public List<Doctor> getAllDoctors() {
		return dao.getAllDoctors();
	}
	
	/**
	 * super's toString
	
	 * @return super's toString */
	public String toString() {
		return super.toString();
	}
	
}
